import request from '@/utils/request'

// 查询人员数据
export function getPersonOperateList(query) {
  return request({
    url: '/personOperateStandardController/getPersonInfoChangeOperatePage',
    method: 'get',
    params: query
  })
}

// 根据id查询单位信息
export function queryAgencyInfoById(query) {
  return request({
    url: '/agencyInfoController/queryAgencyInfoById',
    method: 'get',
    params: query
  })
}

// 获取在职和离职人数
export function getStateNum(query) {
  return request({
    url: '/personInfoController/getStateNum',
    method: 'get',
    params: query
  })
}

// 新增人员数据
export function savePersonInfo(data) {
  return request({
    url: '/personOperateStandardController/savePersonOperate',
    method: 'post',
    data
  })
}

// 撤销操作
export function revokeOperate(data) {
  return request({
    url: '/personOperateStandardController/revokeOperate',
    method: 'post',
    data
  })
}

// 送审
export function submitPersonOperateList(data) {
  return request({
    url: '/personOperateStandardController/submitPersonOperateList',
    method: 'post',
    data
  })
}

// 撤销送审
export function undoSubmitPersonOperateList(data) {
  return request({
    url: '/personOperateStandardController/undoSubmitPersonOperateList',
    method: 'post',
    data
  })
}

export function outPutPersonOperateList(query) {
  return request({
    url: '/outPutPersonOperateList',
    method: 'get',
    responseType: 'blob',
    params: query
  })
}

export function queryPersonFileNum(query) {
  return request({
    url: 'fileInfoController/queryPersonFileNum',
    method: 'get',
    params: query
  })
}

// 审核操作
export function personApproved(data) {
  return request({
    url: '/personOperateStandardController/personApproved',
    method: 'post',
    data
  })
}

export function rejectPersonApproved(data) {
  return request({
    url: '/personOperateStandardController/rejectPersonApproved',
    method: 'post',
    data
  })
}
export function queryAgencyPersonRestrict(data) {
  return request({
    url: '/personOperateStandardController/queryAgencyPersonRestrict',
    method: 'post',
    data
  })
}
export function queryExistingNumber(data) {
  return request({
    url: '/personOperateStandardController/queryExistingNumber',
    method: 'post',
    data
  })
}
